﻿import QtQuick 2.7
import "Temp.js" as PokeClass

Rectangle {
    width: 500
    height: 500

    id: root

    Poke {
	id: poke1
        width: 84
        height: 127
        pokeSource : "Pai101.jpg"
        pokeBackSource : "PaiBei.jpg"
        flags : PokeClass.Flag_Show | PokeClass.Flag_Enable
        onClicked: {flags ^= PokeClass.Flag_Clicked; poke2.flags^=PokeClass.Flag_Enable;  poke3.flags^=PokeClass.Flag_Enable;}
    }
    Poke {
	id: poke2
        x: 100
        y: 100
        width: 84
        height: 127
        pokeSource : "Pai102.jpg"
        pokeBackSource : "PaiBei.jpg"
        flags : PokeClass.Flag_Show
        bZhengMian: false
        onClicked: flags ^= PokeClass.Flag_Clicked
    }
    Poke {
	id: poke3
        x: 100
        y: 200
        width: 84
        height: 127
        //bTemp: true
        pokeSource : "Pai101.jpg"
        pokeBackSource : "PaiBei.jpg"
        flags : PokeClass.Flag_Show | PokeClass.Flag_Enable
        onClicked: {
            onClicked: flags ^= PokeClass.Flag_Clicked
            console.log(bClicked);
            x = x+100;
            y = y+200;
            if(x >= 500)x=0;
            if(y >= 500)y=0;

            //image.source = "1.jpg"
        }
    }
}
